From 7a4a7ca8f645e437fceab2f868ca4e18e0202f74 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Fri, 22 Oct 2021 01:52:09 +0200
Subject: [PATCH 2/7] remove remaining dpkg references

---
 mkinitramfs      |  2 +-
 update-initramfs | 11 ++---------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/mkinitramfs b/mkinitramfs
index 0f7b81e..6be2173 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -100,7 +100,7 @@ maybe_add_conf() {
 	if [ -e "$1" ] && \
 	   basename "$1" \
 	   | grep '^[[:alnum:]][[:alnum:]\._-]*$' \
-	   | grep -qv '\.dpkg-.*$'; then
+	   | grep -qv '\.chimera-.*$'; then
 		if [ -d "$1" ]; then
 			echo "W: $1 is a directory instead of file" >&2
 		else
diff --git a/update-initramfs b/update-initramfs
index 746a6c1..4f8922c 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -11,13 +11,6 @@ set -e
 
 [ -r ${CONF} ] && . ${CONF}
 
-if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] && [ $# = 1 ] && [ "$1" = -u ]; then
-	if dpkg-trigger --no-await update-initramfs; then
-		echo "update-initramfs: deferring update (trigger activated)"
-		exit 0
-	fi
-fi
-
 usage()
 {
 	cat << EOF
@@ -79,7 +72,7 @@ set_initramfs()
 backup_initramfs()
 {
 	[ ! -r "${initramfs}" ] && return 0
-	initramfs_bak="${initramfs}.dpkg-bak"
+	initramfs_bak="${initramfs}.chimera-bak"
 	[ -r "${initramfs_bak}" ] && rm -f "${initramfs_bak}"
 	ln -f "${initramfs}" "${initramfs_bak}" \
 		|| cp -a "${initramfs}" "${initramfs_bak}"
@@ -89,7 +82,7 @@ backup_initramfs()
 # keep booted initramfs
 backup_booted_initramfs()
 {
-	initramfs_bak="${initramfs}.dpkg-bak"
+	initramfs_bak="${initramfs}.chimera-bak"
 
 	# first time run thus no backup
 	[ ! -r "${initramfs_bak}" ] && return 0
-- 
2.37.1

